﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Kortex.test
{
    class test
    {


    }


    public class Params_typeone
    {
        /* public Params_typeone()
         { 
             kprange = new int[10];
         }
          */
        public int addr { get; set; }
        public string state { get; set; }
        public List<int> kprange { get; set; }
        //public int []kprange;
    }

    public class RootObject_OLD
    {

        public RootObject_OLD()
        {
            jsonrpc = "2.0";
            method = "get_operation";
            id = 11;
            @params = new Params_typeone();
            @params.addr = 0;
            /*@params.state = "off";
            // @params.kprange = new int[4];
            @params.kprange = new List<int>();
            @params.kprange.Add(1);
            @params.kprange.Add(2);
            */

            // for (int i = 0; i < @params.kprange.Length; i++) @params.kprange[i] = i;

        }
        public string jsonrpc { get; set; }
        public string method { get; set; }
        public Params_typeone @params { get; set; }
        public int id { get; set; }
    }


    public class Action
    {
        public string name { get; set; }
        public string state { get; set; }
        public int seq { get; set; }
        public int value { get; set; }
    }

    public class Service
    {
        public string name { get; set; }
    }

    public class Resource
    {
        public string name { get; set; }
    }

    public class Param
    {
        public string name { get; set; }
        public string state { get; set; }
        public int seq { get; set; }
        public object value { get; set; }
    }

    public class RootObject
    {
        public Action action { get; set; }
        public Service service { get; set; }
        public Resource resource { get; set; }
        public List<Param> @params { get; set; }
    }


}
